]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Always honor easing duration settings
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 25 Nov 2025 21:48:54 +0000 (22:48 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Jan 2026 17:58:25 +0000 (18:58 +0100)
In case an actor easing is created without an explicit duration, we
should rely to the default animation that Clutter.Actor.save_easing_state()
sets to 250ms.

This fine in normal use cases, but in case the animations are disabled
the current code skips calling our Clutter.Actor.set_easing_duration()
override, and so we just end up leaving the actor easing time to 250ms,
not respecting the St settings

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3983>
(cherry picked from commit 3deaf1eb7d29cda5bc13f3cfc759c9c4da069545)

js/ui/environment.js

index 77f09bf10cbe7955a1c73638bfda007d8e4e410c..6dec8e7f9ec7e30a3f13dcdbe97dc0410987d58c 100644 (file)
@@ -103,8 +103,8 @@ function _easeActor(actor, params) {
     const animationRequired = params.animationRequired;
     delete params.animationRequired;
 
-    if (params.duration !== undefined)
-        actor.set_easing_duration(params.duration, {animationRequired});
+    const duration = params.duration ?? actor.get_easing_duration();
+    actor.set_easing_duration(duration, {animationRequired});
     delete params.duration;
 
     if (params.delay !== undefined)